﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BullTasDesaDal.Entities;

namespace WSBulTasDesa.UserControls
{
    public partial class ucRegion : System.Web.UI.UserControl
    {
        public Zone Zone
        {
            get
            {
                Zone zone = new Zone();
                zone.Id = ddlZones.SelectedValue;
                zone.Name = ddlZones.SelectedItem.Text;
                Region region = new Region();
                region.Id = ddlRegions.ID;
                region.Name = ddlRegions.SelectedItem.Text;
                zone.Region = region;
                return zone;
            }

            set
            {
                CascadingDropDownR.SelectedValue = value.Region.Id;
                CascadingDropDownZ.SelectedValue = value.Id;

            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}